<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="<?= base_url() ?>assets/js/libs/jquery-1.8.0.min.js"><\/script>')</script>
<script src="<?= base_url() ?>assets/js/libs/bootstrap.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script src="<?= base_url() ?>assets/js/libs/jquery.validate.min.js"></script>
<script src="<?= base_url() ?>assets/js/plugins.js"></script>
<!--[if (gte IE 6)&(lte IE 8)]>
<script type="text/javascript" src="<?= base_url() ?>assets/js/libs/selectivizr-min.js"></script>
<![endif]-->
<script src="<?= base_url() ?>assets/js/main.js"></script>
<?
$method = $this->router->fetch_method();
$class = $this->router->fetch_class();
switch ($method) {
case 'index':

break;

case 'search':

break;

case 'accommodation':

break;
}
?>
<script>
    var API = API || {};
    API = {
        Data: {
            base_url: '<?= base_url(); ?>',
            libs_url: '<?= SCRIPT_PATH; ?>',
            method: '<?= $this->router->fetch_method(); ?>',
            lang: {}

        }
    }
</script>

<?
//    $this->firephp->log($method);
switch ($class) {
case ($class == 'posts' && $method == 'view_all'):
case ($class == 'gallery' && $method == 'view_all'):
case ($class == 'documents' && $method == 'view_all'):
?>
<script src="<?= base_url() ?>assets/js/posts_all.js"></script>
<?
break;
case ($class == 'posts' && $method == 'view_edit'):
?>
<script src="<?= base_url() ?>assets/js/posts_all.js"></script>
<script src="<?= base_url() ?>assets/js/post_edit.js"></script>
<script src="<?= SCRIPT_PATH ?>js/libs/tinymce/tinymce.min.js" type="text/javascript"></script>
<?
break;

case ($class == 'gallery' && $method == 'view_new'):
?>
<script src="<?= base_url() ?>assets/js/libs/plupload/plupload.full.js"></script>
<script src="<?= base_url() ?>assets/js/gallery_add.js"></script>
<?
break;

case ($class == 'gallery' && $method == 'view_edit'):
case ($class == 'documents' && $method == 'view_edit'):
?>
<script src="<?= base_url() ?>assets/js/libs/jquery.lightbox-0.5.min.js"></script>
<script src="<?= base_url() ?>assets/js/gallery_edit.js"></script>
<?
break;
case ($class == 'documents' && $method == 'view_new'):
?>
<script src="<?= base_url() ?>assets/js/libs/plupload/plupload.full.js"></script>
<script src="<?= base_url() ?>assets/js/documents_add.js"></script>
<?
break;

case ($class == 'seo' && $method == 'view_edit'):
?>
<script src="<?= base_url() ?>assets/js/seo_edit.js"></script>
<?
break;

case ($class == 'cmssettings' && $method == 'view_all_thimbnail_size'):
?>
<script src="<?= base_url() ?>assets/js/posts_all.js"></script>
<script src="<?= base_url() ?>assets/js/settings_all.js"></script>

<?
break;
case ($class == 'cmssettings' && $method == 'view_add_thimbnail_size'):
case ($class == 'cmssettings' && $method == 'view_edit_thimbnail_size'):
?>
<script src="<?= base_url() ?>assets/js/thumbnails_edit.js"></script>

<?
break;
}
?>